API Documentation
Static Public Member Functions | List of all members
nkAstraeus::lua::nkTasksWrap::TaskWrapper Class Referencefinal

Wraps a nkTasks::Task and offers functions for use in scripting. More...

Static Public Member Functions

static void updateEnvironment (nkScripts::Environment *env)
 
static void * constructor (nkScripts::Environment *env, const nkScripts::DataStack &stack)
 
static void destructor (void *toDestroy)
 
static nkScripts::OutputValue getWorkResult (void *data)
 
static nkScripts::OutputValue getInputBinaryData (void *data)
 
static nkScripts::OutputValue getOutputBinaryData (void *data)
 
static void setWorkFunc (const nkScripts::DataStack &stack)
 
static void setInitScript (const nkScripts::DataStack &stack)
 
static void setInputBinaryData (const nkScripts::DataStack &stack)
 
static void setOutputBinaryData (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue addInputUserData (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue addOutputUserData (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue getInputUserData (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue getOutputUserData (const nkScripts::DataStack &stack)
 

Detailed Description

Wraps a nkTasks::Task and offers functions for use in scripting.

The wrapper internally uses the nkAstraeus::lua::LuaTask to achieve its purpose.

Member Function Documentation

◆ updateEnvironment()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::updateEnvironment ( nkScripts::Environment env)
static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters
envThe environment to set up.

◆ constructor()

static void* nkAstraeus::lua::nkTasksWrap::TaskWrapper::constructor ( nkScripts::Environment env,
const nkScripts::DataStack stack 
)
static

Wrapper function for the constructor of the user type.

local t = nkTasks.Task.new() ;
Parameters
envThe calling environment.
stackThe parameter stack.
Returns
An output value with the user type and data allocated.

◆ destructor()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::destructor ( void *  toDestroy)
static

Wrapper function for the destructor of the user type.

Parameters
toDestroyThe data that has to be freed.

◆ getWorkResult()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::getWorkResult ( void *  data)
static

Wrapper function for the nkTasks::Task::getWorkResult(), exposed as an attribute getter.

local d = t.workResult ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkTasks::TASK_RESULT.

◆ getInputBinaryData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::getInputBinaryData ( void *  data)
static

Wrapper function for the nkAstraeus::lua::nkTasksWrap::LuaTask::getInputBinaryData(), exposed as an attribute getter.

local d = t.inputBinaryData ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkAstraeus::UbyteArrayData.

◆ getOutputBinaryData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::getOutputBinaryData ( void *  data)
static

Wrapper function for the nkAstraeus::lua::nkTasksWrap::LuaTask::getOutputBinaryData(), exposed as an attribute getter.

local d = t.outputBinaryData ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkAstraeus::UbyteArrayData.

◆ setWorkFunc()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::setWorkFunc ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::setWorkFuncReference(), exposed as an attribute setter.

t.workFunc = function () print("r") end ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setInitScript()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::setInitScript ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::setInitScript(), exposed as an attribute setter.

t.workFunc = script ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setInputBinaryData()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::setInputBinaryData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::setInputBinaryData(), exposed as an attribute setter.

t.inputBinaryData = nkScripts.serialize(d) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setOutputBinaryData()

static void nkAstraeus::lua::nkTasksWrap::TaskWrapper::setOutputBinaryData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::setOutputBinaryData(), exposed as an attribute setter.

t.outputBinaryData = nkScripts.serialize(d) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ addInputUserData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::addInputUserData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::addInputUserData().

t:addInputUserData(ptr, false) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ addOutputUserData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::addOutputUserData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::addOutputUserData().

t:addOutputUserData(ptr, false) ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ getInputUserData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::getInputUserData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::getInputUserData().

local ptr = t:getInputUserData(0) ;
Parameters
stackThe parameter stack.
Returns
The output value, as the user data type given.

◆ getOutputUserData()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::TaskWrapper::getOutputUserData ( const nkScripts::DataStack stack)
static

Wrapper function for nkAstraeus::lua::nkTasksWrap::LuaTask::getOutputUserData().

local ptr = t:getOutputUserData(0) ;
Parameters
stackThe parameter stack.
Returns
The output value, as the user data type given.

The documentation for this class was generated from the following file: